package Pantallas;

import net.rim.device.api.ui.Field;
import net.rim.device.api.ui.component.LabelField;
import net.rim.device.api.ui.component.SeparatorField;
/**
 * A class extending the MainScreen class, which provides default standard
 * behavior for BlackBerry GUI applications.
 */
/**
 * 
 * @author ARMGARCES
 */
public final class PantallaError extends Pantalla
{
    /**
     * 
     * @param e
     */
    public PantallaError(Exception e){         
    	super();
    	try{	    	
	    	LabelField excep = new LabelField("",Field.FIELD_LEFT);
	    	LabelField mnsj  = new LabelField("",Field.FIELD_LEFT);

	        excep.setText("Error:  "+e.toString());
	        mnsj.setText("Error: "+e.getMessage());
	        vfm.add(excep);
	        vfm.add(new SeparatorField());
	        vfm.add(mnsj);
	        vfm.add(new SeparatorField());
	        add(vfm);
	    }catch(Exception ex){
	    }
    }
    
    public PantallaError(Exception e,String s){         
    	super();
    	try{	    	
	    	LabelField excep = new LabelField("",Field.FIELD_LEFT);
	    	LabelField mnsj  = new LabelField("",Field.FIELD_LEFT);
	    	LabelField mnsj1  = new LabelField("",Field.FIELD_LEFT);
	        excep.setText("Error:  "+e.toString());
	        mnsj.setText("Error: "+e.getMessage());
	        mnsj1.setText("Mensj: "+s);
	        vfm.add(excep);
	        vfm.add(new SeparatorField());
	        vfm.add(mnsj);
	        vfm.add(new SeparatorField());
	        vfm.add(mnsj1);
	        vfm.add(new SeparatorField());
	        add(vfm);
	    }catch(Exception ex){
	    }
    }
}
